﻿using System.Web.Mvc;
using NHATMSample.Service;

namespace NHATMSample.Controllers {
    [HandleError]
    public class HomeController : Controller {
        private readonly TransactionalService service;

        public HomeController(TransactionalService service) {
            this.service = service;
        }

        public ActionResult Index() {
            service.SaveNewFamily();

            ViewData["Message"] = "Welcome to ASP.NET MVC!";

            return View(service.All());
        }
    }
}